<?php
/* @var $this OrganizersController */
/* @var $model Organizers */

$this->breadcrumbs=array(
	'Quản lý ',
);

?>
<div class="row">
	<div class="col-md-12">
    	<div class="portlet">
        	<div class="portlet-title">
            	<div class="caption"><i class="icon-bar-chart"></i>Danh sách tổ chức</div>
                <div class="actions">
                    	<?php echo CHtml::link('<span><i class="icon-plus"></i> Tạo đơn vị tổ chức</span>', array('organizers/create'), array('class'=>'btn blue btn-sm','target'=>'_blank')); ?>
                </div>
            </div>
<div class="portlet-body">

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'organizers-grid',
	'dataProvider'=>$model->search(),
		'ajaxUpdate'=>true,
		'filter'=>$model,
		'itemsCssClass'=>'table table-striped table-bordered table-advance table-hover',
		'pager'=>array(
	        'header'=>'',
			'maxButtonCount'=>10,
	        'header'=>'',
	        'prevPageLabel'=>'<i class="icon-angle-left"></i></a>',
	        'nextPageLabel'=>'<i class="icon-angle-right"></i></a>',
	        'firstPageLabel'=>'First',
	        'lastPageLabel'=>'Last',
	        'footer'=>'',
			'selectedPageCssClass'=>'active',
			'hiddenPageCssClass'=>'disabled',
	        'htmlOptions'=>array(
	            'class'=>'pagination pagination-sm',
	        ),
	    ),
	'columns'=>array(
		'id',
		array(
				'name'=>'title',
				'type'=>'raw',
        		'value'=>'CHtml::link($data->title,array("organizers/view","id"=>$data->id),array("target"=>"_blank"))',
			),
		'brief', 
		array(
			'name'=>'addressDetail',
			'value'=>'$data->getAddressDetail($data->id)',
		),
		'phone',
		'altphone',
		'fax',
		'website',
		'email',
		'numevents',
		'status',
		//'createddate',
		//'url',
		array(
				'class'=>'CButtonColumn',
				'header'=>'Action',
				'template'=>'{view} {update} {delete}',
				'buttons'=>array
				(
					'view'=>array(
						'label'=>'<i class="icon-share"></i>',
						'imageUrl'=>false,
						'options'=>array(
							'class'=>'btn default btn-xs blue',
							'title'=>'View'
						),
					),
					'update'=>array(
						'label'=>'<i class="icon-edit"></i>',
						'imageUrl'=>false,
						'options'=>array(
							'class'=>'btn default btn-xs green',
							'title'=>'Edit'
						),
					),
					'delete'=>array(
						'label'=>'<i class="icon-trash"></i>',
						'imageUrl'=>false,
						'options'=>array(
							'class'=>'btn default btn-xs black',
							'title'=>'Delete'
						),
					),
				),
				'htmlOptions'=>array(
					'width'=>'100px',
					'class'=>'text-center'
				),
			),
	),
)); ?>

            </div>
        </div>
    </div>
</div>